<?
$id=$_GET[id];
$count=$_POST[count];
if ($id==""){
	for ($i = 1; $i <= $count; $i++) 
	{
	$id= $_POST[industry.$i];
	if($id!=""){break;}
	}
}
if ($id!="")
{
$qr1=mysql_query("select * from tbcontact where contact_id='$id'"); 
$rowedit=mysql_fetch_array($qr1);
$contact_fullname=$rowedit['contact_fullname'];
$contact_address=$rowedit['contact_address'];
$contact_email=$rowedit['contact_email'];
$contact_phone=$rowedit['contact_phone'];
$contact_tieude=$rowedit['contact_tieude'];
$contact_noidung=$rowedit['contact_noidung'];
$contact_ngay=$rowedit['contact_ngay'];
$contact_trangthai=$rowedit['contact_trangthai'];
$contact_phanloai=$rowedit['contact_phanloai'];
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td style="padding:10px">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
  
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td   width="6" height="6"><img src="images/j_crn_tl_med.png" width="6" height="6" /></td>
            <td  background="images/j_crn_t_med.png" width="100%"></td>
            <td  width="6" height="6" ><img src="images/j_crn_tr_med.png" width="6" height="6" /></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="1" background="images/dot.png"></td>
            <td class="bg_title"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="5%"><img src="images/icon-48-menumgr.png" width="48" height="48" /></td>
                <td width="45%" class="mana_title"> Chi tiết liên hệ</td>
                <td width="50%" align="center">
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td width="90%">&nbsp;</td>
                      <td class="icon_style"><a href="#"><img src="images/icon-32-help.png" width="32" height="32"  border="0"/><br />
                      Tr&#7907; gi&uacute;p</a></td>
                    </tr>
                  </table>
                  </td>
              </tr>
            </table></td>
            <td width="1" background="images/dot.png"></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="6" height="6" ><img src="images/j_crn_bl_med.png" width="6" height="6" /></td>
            <td  background="images/j_crn_b_med.png" width="100%"></td>
            <td width="6" height="6" ><img src="images/j_crn_br_med.png" width="6" height="6" /></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="7"></td>
  </tr>
  <tr>
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td   width="6" height="6"><img src="images/j_crn_tl_med.png" width="6" height="6" /></td>
            <td  background="images/j_crn_t_med.png" width="100%"></td>
            <td  width="6" height="6" ><img src="images/j_crn_tr_med.png" width="6" height="6" /></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="1" background="images/dot.png"></td>
            <td bgcolor="#fbfbfb"><form id="frmdanhsach" name="frmdanhsach" method="post" action="index.php?progid=7&lienhe=xuly" onsubmit="return validate_form(this);">
            <input type="hidden" id="id" name="id" value="<?=$id?>"  />
              <table width="100%" border="0" cellspacing="2" cellpadding="2">
                <tr>
                  <td valign="top" style="padding-left:15px; width:64%"><fieldset id="fieldsearch2" runat="server">
                  <legend style="font-size:14px; color: black" title="Search" class="title_field"><span class="title_field">Chi tiết liên hệ</span></legend>
                  <table width="100%" border="0" cellspacing="3" cellpadding="3">
                      <tr>
                        <td align="right" class="bg_form_left">&nbsp;</td>
                        <td class="bg_form_right">
                        <h3>
                        <?
						switch ($contact_phanloai) {
						case '1':
							echo "Liên hệ công ty";
							break;
						case '2':
							echo "Liên hệ công ty";
							break;
						case '3':
							echo "Liên hệ công ty";
							break;
						}
                        ?>
                        </h3></td>
                      </tr>
                      <tr>
                        <td align="right" width="25%" class="bg_form_left">Họ và tên </td>
                        <td class="bg_form_right"> <?=$contact_fullname?>                        </td>
                      </tr>
                      <tr>
                        <td align="right" class="bg_form_left">Địa chỉ</td>
                        <td  class="bg_form_right"><?=$contact_address?></td>
                      </tr>
                      <tr>
                        <td align="right" class="bg_form_left">Email</td>
                        <td  class="bg_form_right"><?=$contact_email?></td>
                      </tr>
                      <tr>
                        <td align="right" valign="top" class="bg_form_left">Điện thoại</td>
                        <td  class="bg_form_right"><?=$contact_phone?></td>
                      </tr>
                      <tr>
                        <td align="right" class="bg_form_left"> <?
						switch ($contact_phanloai) {
						case '1':
							echo "Tiêu đề";
							break;
						case '2':
							echo "Di động";
							break;
						case '3':
							echo "Fax";
							break;
						}
                        ?></td>
                        <td class="bg_form_right"><?=$contact_tieude?></td>
                      </tr>
                      <tr>
                        <td align="right" class="bg_form_left">Nội dung</td>
                        <td class="bg_form_right"><?=$contact_noidung?></td>
                      </tr>
                      <tr>
                        <td align="right" class="bg_form_left">Ngày gửi</td>
                        <td align="left" >
                          <?=$contact_ngay?></td>
                      </tr>
                    </table>
                  </fieldset></td>
                  <td></td>
                  <td  valign="top" style="padding-right:15px; width:35%"><fieldset id="fieldsearch" runat="server">
                  <legend style="font-size:14px; color: black" title="Search" class="title_field"><span class="title_field">Thông tin liên hệ</span></legend>
                  <table width="100%" border="0" cellspacing="3" cellpadding="3">
                    <tr>
                      <td colspan="2"></td>
                      </tr>
                    <tr>
                      <td align="right">&nbsp;</td>
                      <td>&nbsp;</td>
                    </tr>
                    <tr>
                      <td align="right">&nbsp;</td>
                      <td>&nbsp;</td>
                    </tr>
                  </table>
                  </fieldset></td>
                </tr>
              </table>
              
                        </form>
            </td>
            <td width="1" background="images/dot.png"></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="6" height="6" ><img src="images/j_crn_bl_med.png" width="6" height="6" /></td>
            <td  background="images/j_crn_b_med.png" width="100%"></td>
            <td width="6" height="6" ><img src="images/j_crn_br_med.png" width="6" height="6" /></td>
          </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
</td>
  </tr>
</table>
<? }?>